package com.nowcode.community.service;

import com.nowcode.community.entity.LoginTicket;
import com.nowcode.community.entity.User;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.Map;

/**
 * ClassName: UserService
 * Package: com.nowcode.community.service
 * Description:
 *
 * @Author: 信
 * @Create: 2024/1/19 - 19:52
 */
public interface UserService {

    User findUserById(int id);

    Map<String, Object> register(User user);

    int activation(int userId, String code);

    Map<String, Object> login(String username, String password, int expiredSeconds);

    void logout(String ticket);

    LoginTicket findLoginTicket(String ticket);

    int updateHeader(int userId, String headerUrl);

    User findUserByName(String toName);

    Collection<? extends GrantedAuthority> getAuthorities(int id);
}
